home *** CD-ROM | disk | FTP | other *** search
/ The Games Machine 76 / XENIATGM66.iso / Indiana Jones / Indiana Jones.exe / RESOURCE / PREVIEW.GOB / cog_sol_ambhoruswat.cog < prev    next >
Text File  |  1999-11-15  |  1KB  |  54 lines

  1. # Jones 3D Cog Script
  2. #
  3. # SOL_AmbHorusWat.cog
  4. #
  5. # [TRM]
  6. #
  7. # (C) 1999 LucasArts Entertainment Co. All Rights Reserved
  8. # ========================================================================================
  9.  
  10. symbols
  11.  
  12.     message        entered
  13.  
  14.     thing        soundPos0        nolink
  15.     
  16.     sector      on_sec1         linkID=1
  17.     sector      on_sec2         linkID=1
  18.     sector      off_sec1        linkID=0
  19.     sector      off_sec2        linkID=0
  20.  
  21.     sound        sfx_Water=gen_waterfall_a.wav   local
  22.  
  23.     int         chnl_Water       local
  24.     int         playing=0   local
  25.     
  26. end
  27.  
  28. # ========================================================================================
  29.  
  30. code
  31.  
  32. entered:
  33.  
  34.     # turn on waterfall sfx
  35.     if((GetSenderID() == 1) && (playing == 0))
  36.     {
  37.         playing = 1;
  38.         chnl_Water = PlaySoundThing(sfx_Water, soundPos0, 1.0, 18, 28, 0x0001);    # loop
  39.     }
  40.     
  41.     # turn off waterfall sfx
  42.     if((GetSenderID() == 0) && (playing == 1))
  43.     {
  44.         playing = 0;
  45.         StopSound(chnl_Water, 3.0);
  46.     }
  47.     
  48.     return;
  49.  
  50. # ========================================================================================
  51.  
  52. end
  53.  
  54.